package com.authine.cloudpivot.ext.mapper;

import java.util.List;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.authine.cloudpivot.ext.domain.OrgUser;
import com.authine.cloudpivot.util.MyMapper;

public interface OrgUserMapper extends MyMapper<OrgUser> {

    List<OrgUser> selectByUserId(OrgUser orgUser);

    List<OrgUser> selectByUserIdAndDepartmentId(OrgUser orgUser);

    List<OrgUser> selectByNameAndDepartmentId(OrgUser orgUser);

    List<OrgUser> selectByNameAndCorpId(String name, String corpId);

    Integer insertByUser(OrgUser orgUser);

    Integer insertByUserList(List<OrgUser> orgUserList);

    Integer updateAdminCorpId();

    Integer updateByUser(OrgUser user);

    Integer updateByUserList(List<OrgUser> orgUserList);

    Integer deleteLogicByDepartmentId(@Param("departmentId") String departmentId);

    Integer deleteLogicByDepartmentIdSet(Set<String> idSet);

    Integer updateStatusByUserId(@Param("status") String status, @Param("userId") String userId);

}